package com.lesso.zgs.sunflower.app.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.lesso.zgs.sunflower.domain.service.EmployeeAttendanceRuleDomainService;
import com.lesso.zgs.sunflower.pojo.dto.EmployeeAttendanceRuleDTO;
import com.lesso.zgs.sunflower.pojo.dto.EmployeeAttendanceRuleQueryDTO;
import com.lesso.zgs.sunflower.pojo.vo.EmployeeAttendanceRuleVO;
import com.lesso.zgs.sunflower.service.IEmployeeAttendanceRuleService;
import org.apache.dubbo.config.annotation.DubboService;

import java.util.List;

/**
 * <p>
 * 员工考勤规则关系 服务实现类
 * </p>
 *
 * @author zgs
 * @since 2025-07-03
 */
@DubboService
public class EmployeeAttendanceRuleServiceImpl implements IEmployeeAttendanceRuleService {

    private final EmployeeAttendanceRuleDomainService employeeAttendanceRuleDomainService;

    public EmployeeAttendanceRuleServiceImpl(EmployeeAttendanceRuleDomainService employeeAttendanceRuleDomainService) {
        this.employeeAttendanceRuleDomainService = employeeAttendanceRuleDomainService;
    }

    @Override
    public Integer assignRule(EmployeeAttendanceRuleDTO dto) {
        return employeeAttendanceRuleDomainService.assignRule(dto);
    }

    @Override
    public Integer cancelRule(Long id) {
        return employeeAttendanceRuleDomainService.cancelRule(id);
    }

    @Override
    public Page<EmployeeAttendanceRuleVO> page(EmployeeAttendanceRuleQueryDTO dto) {
        return employeeAttendanceRuleDomainService.page(dto);
    }

    @Override
    public List<EmployeeAttendanceRuleVO> getByEmployeeId(Long employeeId) {
        return employeeAttendanceRuleDomainService.getByEmployeeId(employeeId);
    }
} 